package com.tongqu.service.serviceimpl;


import com.tongqu.entity.Login;
import com.tongqu.entity.User;
import com.tongqu.mapper.UserDao;
import com.tongqu.protocol.TestUser;
import com.tongqu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    public UserDao userDao;

    @Override
    public int findUserExit(String acct) {
        return userDao.findUserExit(acct);
    }

    @Override
    public int insertUser(Login account) {

        return userDao.insertUser(account);
    }

    @Override
    public User findUser(Login account) {
        System.out.println(account.getAcct());
        System.out.println(account.getPass());
        return userDao.findUser(account.getAcct(),account.getPass());
    }

}
